package com.gct.view.dto;

import java.io.Serializable;

import org.apache.ibatis.type.Alias;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;

@Alias("artstatisticsdto")
@JsonIgnoreProperties(ignoreUnknown=true)
public class ArtStatisticsDto implements Serializable {
    private static final long serialVersionUID = -4735034417338793886L;
    private long id;
    @JsonProperty("statsPly")
    private long statisticsPlay;
    @JsonProperty("statsOpn")
    private long statisticsOpen;
    @JsonProperty("statsClt")
    private long statisticsCollect;
    @JsonProperty("statsDld")
    private long statisticsDownload;

    public long getId() {
        return id;
    }
    public void setId(long id) {
        this.id = id;
    }
    public long getStatisticsPlay() {
        return statisticsPlay;
    }
    @JsonSetter("statsPly")
    public void setStatisticsPlay(long statisticsPlay) {
        this.statisticsPlay = statisticsPlay;
    }
    public long getStatisticsOpen() {
        return statisticsOpen;
    }
    @JsonSetter("statsOpn")
    public void setStatisticsOpen(long statisticsOpen) {
        this.statisticsOpen = statisticsOpen;
    }
    public long getStatisticsCollect() {
        return statisticsCollect;
    }
    @JsonSetter("statsClt")
    public void setStatisticsCollect(long statisticsCollect) {
        this.statisticsCollect = statisticsCollect;
    }
    public long getStatisticsDownload() {
        return statisticsDownload;
    }
    @JsonSetter("statsDld")
    public void setStatisticsDownload(long statisticsDownload) {
        this.statisticsDownload = statisticsDownload;
    }

    @Override
    public boolean equals(Object obj) {
        if(obj instanceof ArtStatisticsDto)
            if(((ArtStatisticsDto) obj).getId() == this.id)
                return true;
        return false;
    }
    @Override
    public int hashCode() {
        return (int) (this.id^(this.id>>>32));
    }
}
